package cn.gjxblog.controller;


import cn.gjxblog.common.model.HttpResult;
import cn.gjxblog.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author gjx
 * @version v1.0
 * @Description  邮件服务接口
 * @date 2018/12/7 14:30
 */
@RestController
@RequestMapping("/mail")
public class MailController {

    @Autowired
    private MailService mailService;

    @GetMapping("/snedSimplMail")
    public HttpResult snedSimplMail(String subject, String content, String toEmail){
        mailService.snedSimplMail(subject,content,toEmail);
        return HttpResult.success();
    }


}
